package cn.pattern.SingletonPattern;

public class SingletonPattern {

    private SingletonPattern() {
    }


    private  static volatile SingletonPattern singletonPattern;

    public static SingletonPattern getSingletonPattern() {
        if (null == singletonPattern) {
            synchronized (SingletonPattern.class) {
                if (null == singletonPattern) {
                    singletonPattern = new SingletonPattern();
                }
            }
        }
        return singletonPattern;
    }

}
